﻿using System;

using Microsoft.Xna.Framework;

namespace Ah.Testudin.Engine.UI.Elements
{
    public abstract class ScreenElementBase : IScreenElement
    {
        #region Protected Member Variables

        protected Vector2 _position;

        protected int _width, _height;

        #endregion

        #region Constructors

        public ScreenElementBase(
            Vector2 position,
            int width,
            int height)
        {
            if (position == null)
            {
                throw new ArgumentNullException("position");
            }

            _position = position;

            _width = width;

            _height = height;
        }

        #endregion

        #region IScreenElement

        public abstract short ZOrder { get; }

        public abstract bool Visible { get; }

        public abstract bool ProcessInput();

        public abstract void Update(GameTime gameTime);

        public abstract void Render();

        public virtual void Dispose()
        {
            // Do nothing
        }

        #endregion
    }
}
